#if !defined(SIMPLE_SUFFIX_ARRAY_H)
#define SIMPLE_SUFFIX_ARRAY_H

#include <vector>
#include <string>

class t_simple_suffix_array
{
	std::vector<unsigned>	pos;
	const std::string&		search_buffer;
	const unsigned			tuple_size;
	unsigned _find		(	const std::string&	search_tuple, 
							unsigned		search_buffer_beg_pos, 
							unsigned&		search_buffer_end_pos, 
							unsigned		search_tuple_beg_pos,
							unsigned&		search_tuple_end_pos,
							std::vector<unsigned>::const_iterator& results_beg,
							std::vector<unsigned>::const_iterator& results_end);
public:
	t_simple_suffix_array(const std::string& search_buffer_, const unsigned tuple_size_);
	unsigned find_first_of(	const std::string& search_tuple,
							unsigned search_buffer_beg_pos = 0, 
							unsigned search_buffer_end_pos = std::string::npos, 
							unsigned search_tuple_beg_pos = 0,
							unsigned search_tuple_end_pos = std::string::npos);
	unsigned find_last_of(	const std::string& search_tuple,
							unsigned search_buffer_beg_pos = 0, 
							unsigned search_buffer_end_pos = std::string::npos, 
							unsigned search_tuple_beg_pos = 0,
							unsigned search_tuple_end_pos = std::string::npos);
};

#endif
